<?php
class LoginController extends Controller{

	public function __init(){

	}
	//后台登录
	public function login(){
		if(IS_POST){
			$db=K('Login');
			if($db->login()){
				go('Index/index');
			}else{
				$this->error($db->error);
			}

		}else{
			$this->display();
		}

	}
	//登录时验证码
	public function code(){
		$ob=new Code;
		$ob->show();
	}
	// 退出
	public function out(){
		unset($_SESSION['user']);
		go('Login');
	}

}

?>